#include<stdio.h>

int main()
{
	char x[]="dje2djHJHHO77943Bdd23";
	int DaXie=0;
	int XiaoXie=0;
	int ShuZi=0;
	for(int i=0;x[i]!='\0';i++)
	{
		if((x[i]>=65)&&(x[i]<=90))
		   DaXie++;
		if((x[i]>=97)&&(x[i]<=122))
		   XiaoXie++;
		if((x[i]>=48)&&(x[i]<=57))
		   ShuZi++;
	} 
	 printf("%d\n",DaXie);
	 printf("%d\n",XiaoXie);
	 printf("%d\n",ShuZi);
	 return 0;
}
